Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add cosmos.msg.v1.service to message services #8820

Closed
wants to merge 3 commits into from

Conversation

mattverse
Copy link
Member

Closes: #XXX

What is the purpose of the change

Taking over PR #8689

Testing and Verifying

This change is a trivial rework / code cleanup without any test coverage.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

Copy link
Contributor

coderabbitai bot commented Nov 13, 2024

Walkthrough

The pull request includes updates to the CHANGELOG.md file, detailing changes related to state breaking, state compatible, and state machine breaking categories. Additionally, it introduces a new option to the Msg service in multiple proto files, indicating that these services are now recognized as Cosmos message services. The changes primarily enhance the integration of various services with the Cosmos messaging framework without altering existing functionalities or message structures.

Changes

File Path Change Summary
CHANGELOG.md Updated with new entries for state breaking, state compatible, and state machine breaking changes.
proto/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/gamm/poolmodels/balancer/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/gamm/poolmodels/stableswap/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/gamm/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/ibchooks/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/incentives/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/lockup/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/poolmanager/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/protorev/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/smartaccount/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/superfluid/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/tokenfactory/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/txfees/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.
proto/osmosis/valsetpref/v1beta1/tx.proto Added service option option (cosmos.msg.v1.service) = true; to Msg service.

Possibly related PRs

Suggested labels

C:docs, V:state/breaking, A:no-changelog

Suggested reviewers

  • czarcas7ic
  • nicolaslara
  • p0mvn

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fa01dd4 and 8b4fcd9.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Important Notice

This PR modifies an in-repo Go module. It is one of:

  • osmomath
  • osmoutils
  • x/ibc-hooks
  • x/epochs

The dependent Go modules, especially the root one, will have to be
updated to reflect the changes. Failing to do so might cause e2e to fail.

Please follow the instructions below:

  1. Open https://github.com/osmosis-labs/osmosis/actions/workflows/go-mod-auto-bump.yml
  2. Provide the current branch name
  3. On success, confirm if an automated commit corretly updated the go.mod and go.sum files

Please let us know if you need any help.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Outside diff range and nitpick comments (5)
proto/osmosis/protorev/v1beta1/tx.proto (2)

Line range hint 171-172: Improve documentation for deprecated message

The comment for MsgSetBaseDenomsResponse should follow standard deprecation documentation patterns. Consider adding:

  • When it was deprecated
  • What replaces it (if anything)
  • When it will be removed (if planned)
-// Deprecated, but must be retained in the file to allow indexers
-// to index blocks since genesis
+// Deprecated: This message is retained only for backward compatibility with indexers
+// that need to process historical blocks. Do not use in new code.
+// Note: Required until the next major version upgrade.
 message MsgSetBaseDenomsResponse {}

Line range hint 173-177: Fix incomplete message definition

The MsgSetPoolWeights message appears to be missing standard options and field annotations that are present in other messages:

 message MsgSetPoolWeights {
+  option (amino.name) = "osmosis/MsgSetPoolWeights";
+  option (cosmos.msg.v1.signer) = "admin";
+
   // admin is the account that is authorized to set the pool weights.
-  string admin = 1;
+  string admin = 1 [
+    (gogoproto.moretags) = "yaml:\"admin\"",
+    (cosmos_proto.scalar) = "cosmos.AddressString"
+  ];
   // pool_weights is the list of pool weights to set.
-  PoolWeights pool_weights = 2;
+  PoolWeights pool_weights = 2 [
+    (gogoproto.moretags) = "yaml:\"pool_weights\"",
+    (gogoproto.nullable) = false
+  ];
 }
proto/osmosis/gamm/v1beta1/tx.proto (1)

Line range hint 140-140: Consider addressing the TODO comment in a follow-up PR.

The TODO suggests renaming MsgJoinSwapExternAmountIn to MsgJoinSwapExactAmountIn for better naming consistency with other messages.

Would you like me to help create a follow-up issue to track this rename? This would involve:

  1. Renaming the message type
  2. Updating all references
  3. Maintaining backward compatibility if needed
proto/osmosis/superfluid/tx.proto (1)

Line range hint 89-93: Consider documenting or removing the commented-out SuperfluidRedelegate message

The commented-out MsgSuperfluidRedelegate and its response type should either:

  1. Include a TODO comment explaining future implementation plans, or
  2. Be removed if it's no longer needed
CHANGELOG.md (1)

72-72: Consider expanding the changelog entry description.

The current entry "fix: add cosmos.msg.v1.service to message services" could be more descriptive about what this change accomplishes. Consider adding more context about:

  • What problem this solves
  • What message services are affected
  • Any impacts on existing functionality
-* [#8820](https://github.com/osmosis-labs/osmosis/pull/8820) fix: add cosmos.msg.v1.service to message services
+* [#8820](https://github.com/osmosis-labs/osmosis/pull/8820) fix: add cosmos.msg.v1.service option to message services to ensure proper Cosmos SDK compatibility and message routing
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e942fde and fa01dd4.

⛔ Files ignored due to path filters (14)
  • x/concentrated-liquidity/model/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/gamm/pool-models/balancer/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/gamm/pool-models/stableswap/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/gamm/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/ibc-hooks/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/incentives/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/lockup/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/poolmanager/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/protorev/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/smart-account/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/superfluid/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/tokenfactory/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/txfees/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
  • x/valset-pref/types/tx.pb.go is excluded by !**/*.pb.go, !**/*.pb.go
📒 Files selected for processing (15)
  • CHANGELOG.md (1 hunks)
  • proto/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/gamm/poolmodels/balancer/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/gamm/poolmodels/stableswap/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/gamm/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/ibchooks/tx.proto (1 hunks)
  • proto/osmosis/incentives/tx.proto (1 hunks)
  • proto/osmosis/lockup/tx.proto (1 hunks)
  • proto/osmosis/poolmanager/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/protorev/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/smartaccount/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/superfluid/tx.proto (1 hunks)
  • proto/osmosis/tokenfactory/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/txfees/v1beta1/tx.proto (1 hunks)
  • proto/osmosis/valsetpref/v1beta1/tx.proto (1 hunks)
🔇 Additional comments (7)
proto/osmosis/ibchooks/tx.proto (1)

12-13: LGTM! Standard Cosmos SDK service declaration.

The addition of cosmos.msg.v1.service option follows Cosmos SDK best practices for message service declarations.

Let's verify the consistency of this change across other mentioned files:

✅ Verification successful

All Msg services have the cosmos.msg.v1.service option.

Verified that all Msg services in proto/osmosis/ include the cosmos.msg.v1.service option as per Cosmos SDK best practices.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all Msg services have the cosmos.msg.v1.service option

# Search for Msg service definitions and their cosmos.msg.v1.service option
rg -U "service Msg \{[\s\S]*?\}" proto/osmosis/ | \
  grep -B1 -A3 "service Msg"

# Specifically check for any Msg services missing the option
rg -U "service Msg \{(?:(?!\(cosmos\.msg\.v1\.service\)).)*?\}" proto/osmosis/

Length of output: 5577


Script:

#!/bin/bash
# Description: Check that all Msg services have the cosmos.msg.v1.service option

# Find all tx.proto files containing 'service Msg {'
msg_services=$(rg -l 'service Msg\s*\{' proto/osmosis/**/*.proto)

# Initialize a flag to track missing options
missing=0

# Iterate over each file and check for the option
for file in $msg_services; do
  if ! rg -q 'option\s+\(cosmos\.msg\.v1\.service\)\s*=\s*true;' "$file"; then
    echo "Missing option in: $file"
    missing=1
  fi
done

# Exit with status 1 if any missing options are found
if [ $missing -eq 1 ]; then
  exit 1
else
  echo "All Msg services have the cosmos.msg.v1.service option."
fi

Length of output: 1572

proto/osmosis/smartaccount/v1beta1/tx.proto (1)

11-12: LGTM! The cosmos.msg.v1.service option is correctly implemented.

The addition of option (cosmos.msg.v1.service) = true; is properly placed within the Msg service definition and aligns with Cosmos SDK standards for message service declarations.

Let's verify consistent implementation across related proto files:

✅ Verification successful

Verified! The cosmos.msg.v1.service option is consistently implemented across all relevant proto files, and the necessary import statements are correctly included.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent implementation of cosmos.msg.v1.service option
# across all proto files that define Msg services

# Search for Msg service definitions and their cosmos.msg.v1.service option usage
rg -U "service Msg \{[\s\S]*?\}" --type proto | grep -B 2 -A 2 "service Msg"

# Verify the import statement exists in files with the option
rg "import.*cosmos/msg/v1/msg\.proto" --type proto

Length of output: 191


Script:

#!/bin/bash
# Description: Check for consistent implementation of cosmos.msg.v1.service option
# across all proto files that define Msg services

# Define 'proto' as a file type for ripgrep
rg --type-add 'proto:*.proto' -U "service Msg \{[\s\S]*?\}" --type proto | grep -B 2 -A 2 "service Msg"

# Verify the import statement exists in files with the option
rg --type-add 'proto:*.proto' "import.*cosmos/msg/v1/msg\.proto" --type proto

Length of output: 6513

proto/osmosis/lockup/tx.proto (1)

15-15: LGTM! Correct implementation of Cosmos message service option.

The addition of option (cosmos.msg.v1.service) = true; properly integrates this service with the Cosmos SDK messaging framework. The required import is already present and the syntax is correct.

proto/osmosis/valsetpref/v1beta1/tx.proto (1)

15-15: LGTM! Service option correctly added.

The addition of option (cosmos.msg.v1.service) = true; is correct and consistent with the pattern being applied across other proto files. This change properly identifies this as a Cosmos message service while maintaining backward compatibility.

Let's verify this pattern is consistently applied across other proto files:

proto/osmosis/protorev/v1beta1/tx.proto (1)

14-15: LGTM: Service option addition is correct

The addition of option (cosmos.msg.v1.service) = true; is properly implemented and aligns with the standardization of Cosmos message services across the codebase.

Let's verify this change is consistent across other proto files:

proto/osmosis/superfluid/tx.proto (1)

16-16: LGTM: Service option addition aligns with Cosmos SDK standards

The addition of option (cosmos.msg.v1.service) = true; is correct and properly imported. This change standardizes the message service definition according to Cosmos SDK conventions.

CHANGELOG.md (1)

Line range hint 1-1338: LGTM - Changelog structure and formatting.

The changelog follows good practices with:

  • Clear sections for different types of changes
  • Proper version headers and dates
  • Well-formatted PR links
  • Consistent entry formatting

Comment on lines +12 to +13
option (cosmos.msg.v1.service) = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing cosmos.msg.v1.service option in proto/osmosis/cosmwasmpool/v1beta1/tx.proto.

  • The Msg service in this file does not include the option (cosmos.msg.v1.service) = true;.
🔗 Analysis chain

LGTM! Correctly adds Cosmos message service option.

The addition of option (cosmos.msg.v1.service) = true; is correct and aligns with Cosmos SDK message service conventions.

Let's verify this change is consistently applied across related message services:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent application of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Search for Msg services in proto files
rg -U "service Msg \{[\s\S]*?\}" --type proto

# Search for the cosmos.msg.v1.service option in proto files
rg "option \(cosmos\.msg\.v1\.service\) = true;" --type proto

Length of output: 171


Script:

#!/bin/bash
# Description: Verify consistent application of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Find all .proto files and search for 'service Msg { ... }'
fd --extension proto . | xargs rg -U "service Msg \{[\s\S]*?\}"

# Find all .proto files and search for the cosmos.msg.v1.service option
fd --extension proto . | xargs rg "option \(cosmos\.msg\.v1\.service\) = true;"

Length of output: 20848

@@ -11,6 +11,8 @@ import "cosmos/msg/v1/msg.proto";
option go_package = "github.com/osmosis-labs/osmosis/v27/x/gamm/pool-models/balancer";

service Msg {
option (cosmos.msg.v1.service) = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistency detected: Missing cosmos.msg.v1.service option in multiple Msg services.

The following proto files define service Msg without the required cosmos.msg.v1.service option:

  • proto/osmosis/superfluid/tx.proto
  • proto/osmosis/txfees/v1beta1/tx.proto
  • proto/osmosis/valsetpref/v1beta1/tx.proto
  • proto/osmosis/gamm/v1beta1/tx.proto
  • proto/osmosis/smartaccount/v1beta1/tx.proto
  • proto/osmosis/tokenfactory/v1beta1/tx.proto
  • proto/osmosis/concentratedliquidity/v1beta1/tx.proto
  • proto/osmosis/lockup/tx.proto
  • proto/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.proto
  • proto/osmosis/protorev/v1beta1/tx.proto
  • proto/osmosis/gamm/poolmodels/balancer/v1beta1/tx.proto
  • proto/osmosis/gamm/poolmodels/stableswap/v1beta1/tx.proto
  • proto/osmosis/poolmanager/v1beta1/tx.proto
  • proto/osmosis/incentives/tx.proto
  • proto/osmosis/ibchooks/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/tx.proto

Please ensure that the cosmos.msg.v1.service option is added to all Msg service definitions to maintain consistency across the codebase.

🔗 Analysis chain

LGTM! The Cosmos message service option is correctly implemented.

The addition of option (cosmos.msg.v1.service) = true; follows the Cosmos SDK conventions for message services and is properly placed within the service definition block.

Let's verify the consistency of this change across other proto files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the cosmos.msg.v1.service option is consistently applied across all proto files with Msg services
# Expected: All Msg services should have this option

# Search for Msg service definitions and verify they include the cosmos.msg.v1.service option
rg -U "service Msg \{[\s\S]*?\}" --type proto | grep -v "cosmos\.msg\.v1\.service"

# If the above command returns results, it indicates Msg services that are missing the option

Length of output: 114


Script:

#!/bin/bash
# Description: Check if the cosmos.msg.v1.service option is consistently applied across all proto files with Msg services
# Expected: All Msg services should have this option

# Search for Msg service definitions and verify they include the cosmos.msg.v1.service option
rg -U "service Msg \{[\s\S]*?\}" --glob "*.proto" | grep -v "cosmos\.msg\.v1\.service"

# If the above command returns results, it indicates Msg services that are missing the option

Length of output: 18427

Comment on lines +11 to +12
option (cosmos.msg.v1.service) = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing cosmos.msg.v1.service option in multiple proto files.

The following proto files are missing the required cosmos.msg.v1.service option:

  • proto/osmosis/tokenfactory/v1beta1/tx.proto
  • proto/osmosis/valsetpref/v1beta1/tx.proto
  • proto/osmosis/txfees/v1beta1/tx.proto
  • proto/osmosis/gamm/v1beta1/tx.proto
  • proto/osmosis/gamm/poolmodels/stableswap/v1beta1/tx.proto
  • proto/osmosis/gamm/poolmodels/balancer/v1beta1/tx.proto
  • proto/osmosis/concentratedliquidity/poolmodel/concentrated/v1beta1/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/model/tx.proto
  • proto/osmosis/superfluid/tx.proto
  • proto/osmosis/smartaccount/v1beta1/tx.proto
  • proto/osmosis/lockup/tx.proto
  • proto/osmosis/incentives/tx.proto
  • proto/osmosis/protorev/v1beta1/tx.proto
  • proto/osmosis/poolmanager/v1beta1/tx.proto
  • proto/osmosis/ibchooks/tx.proto

Please ensure that all Msg services across these proto files include the option (cosmos.msg.v1.service) = true; declaration to maintain consistency and adhere to Cosmos SDK protobuf standards.

🔗 Analysis chain

LGTM! Verify consistency across other proto files.

The addition of cosmos.msg.v1.service option is correct and follows Cosmos SDK protobuf standards. This is a non-breaking change that enhances service discovery and code generation.

Let's verify that this change is consistently applied across other similar proto files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Search for Msg services in proto files
rg -l "service Msg" --type proto

# Check which of these services have the cosmos.msg.v1.service option
rg -l "option \(cosmos\.msg\.v1\.service\) = true" --type proto

# Find any Msg services that might be missing the option
rg -l "service Msg" --type proto | while read file; do
  if ! grep -q "option (cosmos.msg.v1.service) = true" "$file"; then
    echo "Missing cosmos.msg.v1.service option in: $file"
  fi
done

Length of output: 237


Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Search for Msg services in proto files
rg -l "service Msg" --glob "*.proto"

# Check which of these services have the cosmos.msg.v1.service option
rg -l "option (cosmos\.msg\.v1\.service) = true;" --glob "*.proto"

# Find any Msg services that might be missing the option
for file in $(rg -l "service Msg" --glob "*.proto"); do
  if ! rg -q "option (cosmos\.msg\.v1\.service) = true;" "$file"; then
    echo "Missing cosmos.msg.v1.service option in: $file"
  fi
done

Length of output: 6512

@@ -10,6 +10,8 @@ import "cosmos/msg/v1/msg.proto";
option go_package = "github.com/osmosis-labs/osmosis/v27/x/gamm/pool-models/stableswap";

service Msg {
option (cosmos.msg.v1.service) = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistency Found: Missing cosmos.msg.v1.service option in proto/osmosis/cosmwasmpool/v1beta1/tx.proto.

  • Add option (cosmos.msg.v1.service) = true; to the Msg service.
🔗 Analysis chain

LGTM! Correctly adds Cosmos message service option.

The addition of option (cosmos.msg.v1.service) = true; is correct and aligns with Cosmos SDK standards for message services.

Let's verify this change is consistently applied across other proto files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Search for Msg services in proto files
rg -U "service Msg \{[\s\S]*?\}" --type proto

# Search for the cosmos.msg.v1.service option
rg "option \(cosmos\.msg\.v1\.service\) = true;" --type proto

Length of output: 171


Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Search for Msg services in proto files
rg -U "service Msg \{[\s\S]*?\}" -g "*.proto"

# Search for the cosmos.msg.v1.service option
rg "option \(cosmos\.msg\.v1\.service\) = true;" -g "*.proto"

Length of output: 20812

@@ -12,6 +12,8 @@ import "cosmos/msg/v1/msg.proto";
option go_package = "github.com/osmosis-labs/osmosis/v27/x/incentives/types";

service Msg {
option (cosmos.msg.v1.service) = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing cosmos.msg.v1.service option in proto/osmosis/cosmwasmpool/v1beta1/tx.proto.

The Msg service in proto/osmosis/cosmwasmpool/v1beta1/tx.proto does not include option (cosmos.msg.v1.service) = true;, which is inconsistent with other proto files and may affect integration with the Cosmos SDK framework.

🔗 Analysis chain

LGTM! Correctly implements Cosmos SDK message service standard.

The addition of option (cosmos.msg.v1.service) = true; properly declares this as a Cosmos SDK message service, which is the correct implementation pattern for Cosmos-based blockchain modules. This change maintains compatibility while enhancing integration with the Cosmos ecosystem.

Let's verify this change is consistent across other proto files mentioned in the summary:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have the cosmos.msg.v1.service option

# Search for Msg service definitions and their associated cosmos.msg.v1.service option
rg -U "service Msg \{[\s\S]*?\}" proto/osmosis/

Length of output: 19569

@@ -12,6 +12,8 @@ option go_package = "github.com/osmosis-labs/osmosis/v27/x/lockup/types";

// Msg defines the Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing cosmos.msg.v1.service option in multiple proto files:

  • proto/osmosis/concentratedliquidity/v1beta1/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/model/tx.proto
🔗 Analysis chain

Verify consistent implementation across message services.

Let's ensure this standardization is applied consistently across all message services in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files

# Find all proto files containing "service Msg"
echo "Checking Msg services in proto files..."
rg -l "service Msg" --type proto | while read -r file; do
    echo "=== $file ==="
    # Check if the file has the cosmos.msg.v1.service option
    if ! rg "option \(cosmos\.msg\.v1\.service\) = true;" "$file" --quiet; then
        echo "WARNING: Missing cosmos.msg.v1.service option"
    fi
    # Show the Msg service definition context
    rg "service Msg \{" -A 5 "$file"
done

# Verify the import statement exists where the option is used
echo -e "\nChecking for proper imports..."
rg "option \(cosmos\.msg\.v1\.service\) = true;" -l --type proto | while read -r file; do
    echo "=== $file ==="
    if ! rg "import \"cosmos/msg/v1/msg\.proto\";" "$file" --quiet; then
        echo "WARNING: Missing required import: cosmos/msg/v1/msg.proto"
    fi
done

Length of output: 357


Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files

# Find all proto files containing "service Msg"
echo "Checking Msg services in proto files..."
rg -l "service Msg" -g "*.proto" | while read -r file; do
    echo "=== $file ==="
    # Check if the file has the cosmos.msg.v1.service option
    if ! rg "option \(cosmos\.msg\.v1\.service\) = true;" "$file" --quiet; then
        echo "WARNING: Missing cosmos.msg.v1.service option"
    fi
    # Show the Msg service definition context
    rg "service Msg \{" -A 5 "$file"
done

# Verify the import statement exists where the option is used
echo -e "\nChecking for proper imports..."
rg "option \(cosmos\.msg\.v1\.service\) = true;" -l -g "*.proto" | while read -r file; do
    echo "=== $file ==="
    if ! rg "import \"cosmos/msg/v1/msg\.proto\";" "$file" --quiet; then
        echo "WARNING: Missing required import: cosmos/msg/v1/msg.proto"
    fi
done

Length of output: 12031

Comment on lines +14 to +15
option (cosmos.msg.v1.service) = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing cosmos.msg.v1.service option in proto files.

The following .proto files are missing the option (cosmos.msg.v1.service) = true;:

  • proto/osmosis/cosmwasmpool/v1beta1/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/model/tx.proto
🔗 Analysis chain

LGTM! Correctly adds Cosmos message service option.

The addition of option (cosmos.msg.v1.service) = true; is properly implemented with the correct import and syntax. This change enhances the integration with the Cosmos messaging framework without affecting existing functionality.

Let's verify consistent implementation across other proto files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent implementation of cosmos.msg.v1.service option across proto files

# Check for proto files with Msg service but missing the cosmos.msg.v1.service option
echo "Checking for Msg services without cosmos.msg.v1.service option..."
rg -l "service Msg" --type proto | while read -r file; do
  if ! grep -q "option (cosmos\.msg\.v1\.service)" "$file"; then
    echo "Missing option in: $file"
  fi
done

# Verify correct import in all files using the option
echo -e "\nVerifying correct imports..."
rg -l "option \(cosmos\.msg\.v1\.service\)" --type proto | while read -r file; do
  if ! grep -q "import \"cosmos/msg/v1/msg\.proto\";" "$file"; then
    echo "Missing import in: $file"
  fi
done

Length of output: 397


Script:

#!/bin/bash
# Description: Verify consistent implementation of cosmos.msg.v1.service option across proto files

# Define proto file type
rg --type-add 'proto:*.proto' --type proto <<EOF
EOF

# Check for proto files with Msg service but missing the cosmos.msg.v1.service option
echo "Checking for Msg services without cosmos.msg.v1.service option..."
rg -l "service Msg" --type proto | while read -r file; do
  if ! grep -q "option (cosmos\.msg\.v1\.service)" "$file"; then
    echo "Missing option in: $file"
  fi
done

# Verify correct import in all files using the option
echo -e "\nVerifying correct imports..."
rg -l "option \(cosmos\.msg\.v1\.service\)" --type proto | while read -r file; do
  if ! grep -q "import \"cosmos/msg/v1/msg\.proto\";" "$file"; then
    echo "Missing import in: $file"
  fi
done

Length of output: 839


Script:

#!/bin/bash
# Description: Verify consistent implementation of cosmos.msg.v1.service option across proto files

# Define proto file type
rg --type-add 'proto:*.proto'

# Check for proto files with Msg service but missing the cosmos.msg.v1.service option
echo "Checking for Msg services without cosmos.msg.v1.service option..."
rg -l "service Msg" --type proto | while read -r file; do
  if ! grep -q "option (cosmos\.msg\.v1\.service)" "$file"; then
    echo "Missing option in: $file"
  fi
done

# Verify correct import in all files using the option
echo -e "\nVerifying correct imports..."
rg -l "option \(cosmos\.msg\.v1\.service\)" --type proto | while read -r file; do
  if ! grep -q "import \"cosmos/msg/v1/msg\.proto\";" "$file"; then
    echo "Missing import in: $file"
  fi
done

Length of output: 826


Script:

#!/bin/bash
# Description: Verify consistent implementation of cosmos.msg.v1.service option across proto files

# Check for proto files with Msg service but missing the cosmos.msg.v1.service option
echo "Checking for Msg services without cosmos.msg.v1.service option..."
rg -g '*.proto' -l "service Msg" | while read -r file; do
  if ! grep -q "option (cosmos\.msg\.v1\.service)" "$file"; then
    echo "Missing option in: $file"
  fi
done

# Verify correct import in all files using the option
echo -e "\nVerifying correct imports..."
rg -g '*.proto' -l "option \(cosmos\.msg\.v1\.service\)" | while read -r file; do
  if ! grep -q "import \"cosmos/msg/v1/msg\.proto\";" "$file"; then
    echo "Missing import in: $file"
  fi
done

Length of output: 4038

Comment on lines +13 to +14
option (cosmos.msg.v1.service) = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistent application of cosmos.msg.v1.service option across proto files.

The following files are missing the option (cosmos.msg.v1.service) = true; in their Msg service definitions:

  • proto/osmosis/concentratedliquidity/v1beta1/tx.proto
  • proto/osmosis/cosmwasmpool/v1beta1/tx.proto
  • proto/osmosis/smartaccount/v1beta1/tx.proto
  • proto/osmosis/superfluid/tx.proto
  • proto/osmosis/tokenfactory/v1beta1/tx.proto
  • proto/osmosis/lockup/tx.proto
  • proto/osmosis/protorev/v1beta1/tx.proto
  • proto/osmosis/txfees/v1beta1/tx.proto
  • proto/osmosis/valsetpref/v1beta1/tx.proto
🔗 Analysis chain

LGTM! Verify consistency across other proto files.

The addition of option (cosmos.msg.v1.service) = true; is correct and properly integrated with the required import. This change enhances the service's compatibility with the Cosmos SDK messaging framework.

Let's verify this change is consistently applied across other proto files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of cosmos.msg.v1.service option across proto files
# Expected: All Msg services should have this option

# Find all proto files and check for Msg services without the cosmos.msg.v1.service option
fd -e proto | while read -r file; do
  if grep -l "service Msg {" "$file" > /dev/null; then
    if ! grep -A 1 "service Msg {" "$file" | grep -q "option (cosmos\.msg\.v1\.service)"; then
      echo "Warning: $file contains Msg service but missing cosmos.msg.v1.service option"
    fi
  fi
done

Length of output: 12007

Comment on lines +13 to +14
option (cosmos.msg.v1.service) = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Inconsistent application of cosmos.msg.v1.service option detected.

The following proto files have service Msg without the cosmos.msg.v1.service option:

  • ./proto/osmosis/concentratedliquidity/v1beta1/tx.proto
  • ./proto/osmosis/cosmwasmpool/v1beta1/tx.proto

Additionally, ./proto/osmosis/cosmwasmpool/v1beta1/model/tx.proto uses service MsgCreator instead of service Msg.

Please ensure the cosmos.msg.v1.service option is added for consistency across all Msg services.

🔗 Analysis chain

LGTM! Consistent with Cosmos SDK message service pattern.

The addition of cosmos.msg.v1.service option is correct and follows the standard Cosmos SDK pattern for declaring message services.

Let's verify similar changes across other proto files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent application of cosmos.msg.v1.service option across proto files

# Find all proto files with Msg services and check for the cosmos.msg.v1.service option
fd -e proto -x grep -l "service Msg" {} | while read -r file; do
  echo "=== $file ==="
  grep -A 1 "service Msg" "$file"
done

Length of output: 4489

@@ -13,6 +13,8 @@ option go_package = "github.com/osmosis-labs/osmosis/v27/x/superfluid/types";

// Msg defines the Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Add option (cosmos.msg.v1.service) = true; to proto/osmosis/superfluid/tx.proto

The option (cosmos.msg.v1.service) = true; is missing in proto/osmosis/superfluid/tx.proto, which is inconsistent with other proto files.

🔗 Analysis chain

Verify consistency with other proto files

Let's ensure this change is consistently applied across all message services in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for all protobuf message services and check for the cosmos.msg.v1.service option
rg -U "service Msg \{[\s\S]*?\}" proto/ | grep -v "option (cosmos\.msg\.v1\.service)"

Length of output: 18426

@mattverse mattverse added the V:state/breaking State machine breaking PR label Nov 14, 2024
@PaddyMc PaddyMc closed this Nov 18, 2024
@PaddyMc PaddyMc reopened this Nov 18, 2024
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@github-actions github-actions bot added the Stale label Nov 27, 2024
@github-actions github-actions bot closed this Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants